<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head></h:head>
<h:body>
	<p:dialog id="dialogItemCons" modal="true" width="60%" 
		appendTo="@(body)" widgetVar="dialogItemPedidoConsulta"
		header="Item de Pedido" resizable="true" draggable="true">
		<p:ajax event="close"
			listener="#{recebimentoPedidoCompraMB.closeItem}"
			update="frmDialogItemCons" />
		<h:form id="frmDialogItemCons">

			<h:panelGrid columns="2">

				<p:outputLabel value="Produto:" ></p:outputLabel>
				<p:inputText
					value="#{recebimentoPedidoCompraMB.itemPedido.produto.descricao}" disabled="true"
					size="30"></p:inputText>

				<p:outputLabel value="Quantidade:"></p:outputLabel>
				<p:inputText id="iptqtd" onfocus="iptqtd"
					value="#{recebimentoPedidoCompraMB.itemPedido.quantidade}"
					size="15" onkeypress="return(mascaras(this,moeda))"
					converter="doubleConverter" disabled="true" required="true"
					requiredMessage="Quantidade é obrigatória!"></p:inputText>

				<p:outputLabel value="Preço Unit:"></p:outputLabel>
				<p:inputText id="iptpreco" onfocus="iptpreco"
					value="#{recebimentoPedidoCompraMB.itemPedido.preco}" size="15"
					converter="doubleConverter" required="true"
					requiredMessage="Preço é obrigatório"
					onkeypress="return(mascaras(this,moeda))" disabled="true"></p:inputText>

				<p:outputLabel value="Ipi(%):"></p:outputLabel>
				<p:inputText id="iptipi" onfocus="iptipi"
					value="#{recebimentoPedidoCompraMB.itemPedido.ipi}"
					onkeypress="return(mascaras(this,moeda))" size="15"
					converter="doubleConverter" disabled="true"></p:inputText>

				<p:outputLabel value="Icms(%):"></p:outputLabel>
				<p:inputText id="ipticms" onfocus="ipticms"
					value="#{recebimentoPedidoCompraMB.itemPedido.icms}"
					onkeypress="return(mascaras(this,moeda))" size="15"
					converter="doubleConverter" disabled="true"></p:inputText>

				<p:outputLabel value="Data de Previsão:"></p:outputLabel>
				<p:inputMask id="dataprev" disabled="true"
					value="#{recebimentoPedidoCompraMB.itemPedido.dataPrevisao}"
					mask="99/99/9999">
					<f:convertDateTime pattern="dd/MM/yyyy" timeZone="GMT-3" />
				</p:inputMask>

			</h:panelGrid>
			<h:panelGrid columns="2" style="border:0px">
				<p:commandButton id="btnFechar" value="Cancela"
					onclick="dialogItemPedidoConsulta.hide()" immediate="true" />

			</h:panelGrid>

		</h:form>
	</p:dialog>
</h:body>
</html>